package com.uncp.comisiondeadmision.util.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="tipomodalidad")
public class ETipomodalidad implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="CODTIPOMODALIDAD")
	private Integer int_cod_moda;
	
	@Column(name="NOMBRE")
	private String str_nom_moda;
	
	@Column(name="COSTO")
	private double dbl_cost_moda;


	@OneToMany(mappedBy="tipoModalidad",fetch=FetchType.LAZY,cascade = CascadeType.ALL)
	private List<EPostulante> postulantes;
	
	  @ManyToMany(fetch=FetchType.LAZY,cascade = CascadeType.ALL)
	   @JoinTable(name="requisitoxmodalidad",
	   joinColumns={
			   @JoinColumn(name="CODTIPOMODALIDAD")
	   },
	   inverseJoinColumns={
			   @JoinColumn(name="CODREQUISITO")
	   })
	private List<ERequisito> requisitoDetalle;
	
	
	public ETipomodalidad() {	}


	public Integer getInt_cod_moda() {
		return int_cod_moda;
	}


	public void setInt_cod_moda(Integer int_cod_moda) {
		this.int_cod_moda = int_cod_moda;
	}


	public String getStr_nom_moda() {
		return str_nom_moda;
	}


	public void setStr_nom_moda(String str_nom_moda) {
		this.str_nom_moda = str_nom_moda;
	}


	public double getDbl_cost_moda() {
		return dbl_cost_moda;
	}


	public void setDbl_cost_moda(double dbl_cost_moda) {
		this.dbl_cost_moda = dbl_cost_moda;
	}


	public List<EPostulante> getPostulantes() {
		return postulantes;
	}


	public void setPostulantes(List<EPostulante> postulantes) {
		this.postulantes = postulantes;
	}


	public List<ERequisito> getRequisitoDetalle() {
		return requisitoDetalle;
	}


	public void setRequisitoDetalle(List<ERequisito> requisitoDetalle) {
		this.requisitoDetalle = requisitoDetalle;
	}


	
	
	
	
	
	
	

}
